use spring_axum::AppStarting;

pub fn on_app_starting(evt: &AppStarting, _ctx: &spring_axum::ApplicationContext) {
    tracing::info!(
        target = "event",
        host = %evt.config.server.host,
        port = evt.config.server.port,
        cors = evt.config.server.enable_cors,
        devtools = evt.config.devtools.enabled,
        "AppStarting received"
    );
}

// 注册 AppStarting 事件监听器
spring_axum::event_listener!(spring_axum::AppStarting, crate::listeners::app_starting::on_app_starting);